package com.haojin.spring.three;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

/**
 * @author .29.
 * @create 2023-03-02 18:35
 */
@Service
@Validated
public class MyService { //定义Service类，通过注解操作对象
    public String testParams(@NotNull @Valid User user){
        return user.toString();
    }
}
